# coding=utf-8
# -*- coding: UTF-8 -*-
#
# This file is part of the kernelstudio package.
#
# (c) 2014-2025 zlin <admin@kernelstudio.com>
#
# For the full copyright and license information, please view the LICENSE file
# that was distributed with this source code.
from typing import Any

from api.services.extractor_controller import DocumentExtractorBatchController
from api.services.ocr_controller import DocumentOcrBatchController, DocumentOcrController
from ksai.context import ApplicationInitializer, Application
from ksai.web.api import interceptor


class ApiServicesInitializer(ApplicationInitializer):

    def initialize(self, app: Application) -> Any:
        interceptor.add_resource(DocumentOcrController, "/v1/app/document/ocr")
        interceptor.add_resource(DocumentOcrBatchController, "/v1/app/document/ocr/batch")
        interceptor.add_resource(DocumentExtractorBatchController, "/v1/app/document/extract/batch")
